package oj_jisuanke;

import java.util.Scanner;

public class DPandDFS1 {

	static int[][] state = new int[21][21];// 存放所有状态
	static int A;
	static int B;
	static int C;

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		A = scanner.nextInt();
		B = scanner.nextInt();
		C = scanner.nextInt();

		dfs(0, 0, C);
		boolean flag = true;
		for (int i = B; i >= 0; i--) {
			if (state[0][i] == 1) {
				if (flag) {
					System.out.print(C - i);
					flag = false;
				}else{
					System.out.print(" ");
					System.out.print(C - i);
				}
				
			}
		}

	}

	public static void dfs(int a, int b, int c) {
		state[a][b] = 1;

		if (a < A) {// a可以倒
			if (A - a < b && state[A][b - A + a] == 0) {
				dfs(A, b - A + a, c);
			} else if (A - a >= b && state[a + b][0] == 0) {
				dfs(a + b, 0, c);
			}
			if (A - a < c && state[A][b] == 0) {
				dfs(A, b, c - A + a);
			} else if (A - a >= c && state[a + c][b] == 0) {
				dfs(a + c, b, 0);
			}
		}

		if (b < B) {// b可以倒
			if (B - b < a && state[a - B + b][B] == 0) {
				dfs(a - B + b, B, c);
			} else if (B - b >= a && state[0][b + a] == 0) {
				dfs(0, a + b, c);
			}
			if (B - b < c && state[a][B] == 0) {
				dfs(a, B, c - B + b);
			} else if (B - b >= c && state[a][b + c] == 0) {
				dfs(a, b + c, 0);
			}
		}

		if (c < C) {// c可以倒
			if (C - c < a && state[a - C + c][b] == 0) {
				dfs(a - C + c, b, C);
			} else if (C - c >= a && state[0][b] == 0) {
				dfs(0, b, a + c);
			}
			if (C - c < b && state[a][b - C + c] == 0) {
				dfs(a, B - C + c, C);
			} else if (C - c >= b && state[a][0] == 0) {
				dfs(a, 0, b + c);
			}
		}

	}

}
